﻿using Bigger.Web.Helper;
using Bigger.Framework;
using CJAtech.BBS.Process;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CJAtech.BBS.Web.Controllers
{
    public class LMSBBSProcess : BBSBaseProcess
    {
        public LMSBBSProcess(string bbsName)
            : base(bbsName)
        {

        }
        public override UserInfo GetUserInfo()
        {
            string configCode = this.CurrentCommunityConfig.ConfigCode;
            string userId = CookieHelper.GetCookieValue(configCode + "Token");
            if (userId.IsNull())
            {
                userId = Guid.NewGuid().ToString();
                CookieHelper.SetCookieValue(userId, configCode + "Token", DateTime.Now.AddDays(1));
            }
            return new UserInfo
            {
                UserId = userId,
                UserName = "网友",
                Avatar = ""
            };
        }
    }
}